
package com.google.api.ads.dfp.jaxws.v201411;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;


/**
 * 
 *       Provides methods for estimating traffic (clicks/impressions) for line items.
 *       Forecasts can be provided for {@link LineItem} objects that exist in the
 *       system or which have not had an ID set yet.
 *       
 *       <h4>Test network behavior</h4>
 *       
 *       <p>Test networks are unable to provide forecasts that would be
 *       comparable to the production environment because forecasts require traffic
 *       history. For test networks, a consistent behavior can be expected
 *       for forecast requests, according to the following rules:
 *       
 *       <table>
 *       <tr>
 *       <th colspan="2">Inputs<br/>({@link LineItem} Fields)</th>
 *       <th colspan="4">Outputs<br/>({@link Forecast} Fields)</th>
 *       </tr>
 *       <tr>
 *       <th>{@link LineItem#lineItemType lineItemType}</th>
 *       <th>{@link LineItem#unitsBought unitsBought}</th>
 *       <th>{@link Forecast#availableUnits availableUnits}</th>
 *       <th>{@link Forecast#forecastUnits forecastUnits (matchedUnits)}</th>
 *       <th>{@link Forecast#deliveredUnits deliveredUnits}</th>
 *       <th>Exception</td>
 *       </tr>
 *       <tr>
 *       <td>Sponsorship</td>
 *       <td>13</td>
 *       <td>&ndash;&ndash;</td>
 *       <td>&ndash;&ndash;</td>
 *       <td>&ndash;&ndash;</td>
 *       <td>
 *       {@link ForecastError.Reason#NO_FORECAST_YET NO_FORECAST_YET}
 *       </td>
 *       </tr>
 *       <tr>
 *       <td>Sponsorship</td>
 *       <td>20</td>
 *       <td>&ndash;&ndash;</td>
 *       <td>&ndash;&ndash;</td>
 *       <td>&ndash;&ndash;</td>
 *       <td>
 *       {@link ForecastError.Reason#SERVER_NOT_AVAILABLE SERVER_NOT_AVAILABLE}
 *       </td>
 *       </tr>
 *       <tr>
 *       <td>Sponsorship</td>
 *       <td>50</td>
 *       <td>1,200,000</td>
 *       <td>6,000,000</td>
 *       <td>600,000<br/>For prospective: 0</td>
 *       <td>&ndash;&ndash;</td>
 *       </tr>
 *       <tr>
 *       <td>Sponsorship</td>
 *       <td>!= 20 and <br/> != 50</td>
 *       <td>1,200,000</td>
 *       <td>1,200,000</td>
 *       <td>600,000<br/>For prospective: 0</td>
 *       <td>&ndash;&ndash;</td>
 *       </tr>
 *       <tr>
 *       <td>Not Sponsorship</td>
 *       <td>&lt;= 500,000</td>
 *       <td>3 * unitsBought / 2</td>
 *       <td>unitsBought * 6</td>
 *       <td>600,000<br/>For prospective: 0</td>
 *       <td>&ndash;&ndash;</td>
 *       </tr>
 *       <tr>
 *       <td>Not Sponsorship</td>
 *       <td>&gt; 500,000 and &lt;= 1,000,000</td>
 *       <td>unitsBought / 2</td>
 *       <td>unitsBought * 6</td>
 *       <td>600,000<br/>For prospective: 0</td>
 *       <td>&ndash;&ndash;</td>
 *       </tr>
 *       <tr>
 *       <td>Not Sponsorship</td>
 *       <td>&gt; 1,000,000 and &lt;= 1,500,000</td>
 *       <td>unitsBought / 2</td>
 *       <td>3 * unitsBought / 2</td>
 *       <td>600,000<br/>For prospective: 0</td>
 *       <td>&ndash;&ndash;</td>
 *       </tr>
 *       <tr>
 *       <td>Not Sponsorship</td>
 *       <td>&gt; 1,500,000</td>
 *       <td>unitsBought / 4</td>
 *       <td>3 * unitsBought / 2</td>
 *       <td>600,000<br/>For prospective: 0</td>
 *       <td>&ndash;&ndash;</td>
 *       </tr>
 *       </table>
 *     
 * 
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.4-b01
 * Generated source version: 2.1
 * 
 */
@WebService(name = "ForecastServiceInterface", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
@XmlSeeAlso({
    ObjectFactory.class
})
public interface ForecastServiceInterface {


    /**
     * 
     *         Gets a {@link Forecast} on a prospective {@link LineItem} object. Valid
     *         values for {@link LineItem#lineItemType} are
     *         {@link LineItemType#SPONSORSHIP} and {@link LineItemType#STANDARD}. Other
     *         values will result in
     *         {@link ReservationDetailsError.Reason#LINE_ITEM_TYPE_NOT_ALLOWED}.
     *         
     *         @param lineItem the target of the forecast. If {@link LineItem#id} is null
     *         or no line item exists with that ID, a forecast is computed for the
     *         the subject, predicting what would happen if it were added to the
     *         system. If a line item already exists with {@link LineItem#id}, the
     *         forecast is computed for the subject, predicting what would happen
     *         if the existing line item's settings were modified to match the
     *         subject.
     *         @return the forecasted traffic estimates
     *       
     * 
     * @param lineItem
     * @return
     *     returns com.google.api.ads.dfp.jaxws.v201411.Forecast
     * @throws ApiException_Exception
     */
    @WebMethod
    @WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
    @RequestWrapper(localName = "getForecast", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411", className = "com.google.api.ads.dfp.jaxws.v201411.ForecastServiceInterfacegetForecast")
    @ResponseWrapper(localName = "getForecastResponse", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411", className = "com.google.api.ads.dfp.jaxws.v201411.ForecastServiceInterfacegetForecastResponse")
    public Forecast getForecast(
        @WebParam(name = "lineItem", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
        LineItem lineItem)
        throws ApiException_Exception
    ;

    /**
     * 
     *         Gets a {@link Forecast} for an existing {@link LineItem} object. Only
     *         line items having type {@link LineItemType#SPONSORSHIP} or
     *         {@link LineItemType#STANDARD} are valid. Other types will result in
     *         {@link ReservationDetailsError.Reason#LINE_ITEM_TYPE_NOT_ALLOWED}.
     *         
     *         @param lineItemId the ID of a {@link LineItem} to run the forecast on.
     *         @return the forecasted traffic estimates
     *       
     * 
     * @param lineItemId
     * @return
     *     returns com.google.api.ads.dfp.jaxws.v201411.Forecast
     * @throws ApiException_Exception
     */
    @WebMethod
    @WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
    @RequestWrapper(localName = "getForecastById", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411", className = "com.google.api.ads.dfp.jaxws.v201411.ForecastServiceInterfacegetForecastById")
    @ResponseWrapper(localName = "getForecastByIdResponse", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411", className = "com.google.api.ads.dfp.jaxws.v201411.ForecastServiceInterfacegetForecastByIdResponse")
    public Forecast getForecastById(
        @WebParam(name = "lineItemId", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
        Long lineItemId)
        throws ApiException_Exception
    ;

}
